var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Parent = /** @class */ (function () {
    function Parent() {
        this.msg = "parent的msg属性";
        this.title = "标题";
    }
    Parent.prototype.show = function () {
        console.log("parent的show方法", this.msg);
    };
    return Parent;
}());
// TS中在class定义时 以 extends 方式描述需要继承的 class类
// 相当于JS中完成了原型链的指向操作(对父类构造器的属性和原型方法的关联操作)
//    子类继承父类会直接继承父类的 公开属性和公开方法
var Child = /** @class */ (function (_super) {
    __extends(Child, _super);
    function Child() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.info = "child的info属性";
        return _this;
    }
    Child.prototype.print = function () {
        console.log("child的print方法", this.info);
    };
    return Child;
}(Parent));
var c = new Child();
console.log(c.info);
c.print();
console.log(c.msg);
c.show();
// c.title;
var p = new Child();
var o = new Child();
var o1 = new Parent();
